package com.raycloud.erp.omll.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 平台商品信息，每个平台有独立的数据表，平台于平台之间不公用
 * </p>
 *
 * @author 枫伦
 * @since 2021-01-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Sku对象", description="平台商品信息，每个平台有独立的数据表，平台于平台之间不公用")
public class Sku implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID，自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "企业ID")
    private Long companyId;

    @ApiModelProperty(value = "店铺用户的唯一ID")
    private Long userId;

    @ApiModelProperty(value = "平台商品ID")
    private String numIid;

    private Integer skuId;

    @ApiModelProperty(value = "商品标题")
    private String title;

    @ApiModelProperty(value = "sku所对应的销售属性的中文名字串")
    private String propertiesName;

    @ApiModelProperty(value = "sku的销售属性组合字符串")
    private String properties;

    @ApiModelProperty(value = "商家编码")
    private String outerId;

    @ApiModelProperty(value = "商品图片")
    private String picUrl;

    @ApiModelProperty(value = "单位分，转换后的整数")
    private Integer price;

    @ApiModelProperty(value = "是否是有规格的商品")
    @TableField("is_sku_item")
    private Boolean skuItem;

    @ApiModelProperty(value = "条形码")
    private String barcode;

    @ApiModelProperty(value = "库存数量")
    private Integer num;

    @ApiModelProperty(value = "商品所属的店铺内自定义类目列表")
    private String sellerCids;

    @ApiModelProperty(value = "商品所属的平台类目ID（叶子类目）")
    private String cid;

    @ApiModelProperty(value = "商品的状态，onsale出售中，instock库中")
    private String approveStatus;

    @ApiModelProperty(value = "商品是否支持拍下减库存，1拍下减库存;2付款减库存")
    private Boolean subStock;

    @ApiModelProperty(value = "商品在平台上的创建时间")
    private LocalDateTime platformCreated;

    @ApiModelProperty(value = "商品在平台上的最后修改时间")
    private LocalDateTime platformModified;

    @ApiModelProperty(value = "商品在平台上的状态（1有效，0删除）")
    private Integer platformStock;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime created;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modified;

    @ApiModelProperty(value = "数据状态 1：有效 0：无效")
    private Boolean enableStatus;


}
